Prevent duplicates when going back and forward.