Fixed regressions in OSX
Attempted to fix Unplug -> Replug -> Unplug bug