Runtime:removeEventListener sometimes doesn't work

function button1:touch(event) if(event.phase == "began") then Runtime:addEventListener("enterFrame",speedUp) elseif(event.phase == "cancelled" or event.phase == "ended") then Runtime:removeEventListener( "enterFrame", speedUp ) end return true end

Hello. I started making little game with flying ship to learn something and I have a problem.

My game doesn’t always recognise when touch is cancelled or ended and I can’t stop speeding up my ship.