Changes to be able to compile on MAC