Plugged memory leak in map gen.