Fixed a bug in initializing the environment for level creation functions.