Bugfixes osx

Second round of OS X-related bugfixes.