fix the environment in debug