Hack gm functions
Fix safiri error.