fixed bug where app was crashing when returning to map