OS X bugs fixed, fixes #1