Fixes bug in pausing function