Ported to work on OSX and oF0.8