Ian's code for fixing the stop buttons