fixed to properly compile on OSX 10.9