Fixed the bug with pausing and resuming automatically ignoring the user's push of pause button