Minor fixes for os x