* fix some codes for mac.