Fixed crash bugs when walking to edge of levels with lower resolution.