fixed pause function