Removed redundant check
Moved check to right location
Fixed improper Map being used.