Fixed bug causing instantaneous pause and unpause