Make Pause and Play work correctly