fix closure for unix os x.