fixed pause and resume