Fixed errors in the OSX shim; missed return value