fixes for OS X hack