Fix recording and playback stopping