fixing an assert in touchend/cancel