Fixed pausing issue when you switch tabs or exit the app.