Fix error related to mediaType add-on
Fix not quiting on OS X