fixed error and support mac