fix environment intialization