Workaround Mac OS X bugs.