OS X changes

The following changes make it work better on OS X. Also fixes an enum change that got overlooked.