Alex's changes to allow OS X