fixed bug when quitting with pause on