ported evanseeds' changes to mac