#1: Fixes for incompatibility on OSX