More reliable behaviour for the gesture recogniser (fixes a EXC_BAD_ACCESS)