fix pause glitch