A couple fixes for Mac