diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index 64bf1db12a82dc668c7d6283121bc02ae6801dd7..126e0af73bd249d338a9c60aeacbf90596cc387d 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -289,4 +289,13 @@ export class HomePage implements OnInit, OnDestroy {
     //this.locationService.liveLocationSubject.unsubscribe();
   }
 
+  ionViewDidLeave(){
+    if(this.mapElement) {
+      this.mapElement.nativeElement.remove();
+    }
+    // if(this.locationService.liveLocationSubject) {
+    //   this.locationService.liveLocationSubject.unsubscribe();
+    // }
+  }
+
 }
diff --git a/src/app/myreservation/myreservation.page.ts b/src/app/myreservation/myreservation.page.ts
index bffb67acdf5245ce645c54d6b73c282f6773c92c..0f0670957e15b8646fc6e4930745d96150fcce1f 100644
--- a/src/app/myreservation/myreservation.page.ts
+++ b/src/app/myreservation/myreservation.page.ts
@@ -346,4 +346,13 @@ export class MyreservationPage implements OnInit {
     else
       this.router.navigateByUrl('/hirebike');
   }
+
+  ionViewDidLeave(){
+    if(this.mapElement) {
+      this.mapElement.nativeElement.remove();
+    }
+    // if(this.locationService.liveLocationSubject) {
+    //   this.locationService.liveLocationSubject.unsubscribe();
+    // }
+  }
 }