Fixed a crash caused by minimap.