fixed env loading bug