fix pause glitch and remove unused