Fixed bug when navigating to the same image