fix bug with pause and resume speeding up