Fixed a bug when using the searchbar in MapView caused a crash.