Some cleanup for use on mac