added missing methods and clean shutdown to Mac platform