fixed extremely nasty bug when using level template in level editor