fixed bugs with touch state not cleaning when leaving and resuming activity