Fixed issue with ending recordings on OSX