PHOTO: fix history handling when navigating away from the page then back