fixed environment loading bug