Fixes after port to os x