cleaned up mac-specific stuff