Fixed bugs on pauses