Fix OSX issues