fixing the issue bug regarding details view crashing when returning from map view