Fixed a bug in MapController.js.