small fixes for OS X