Bug fix

Fix for adjusting different directions of map building.