diff --git a/public/js/photonav.js b/public/js/photonav.js
index e9019f25..8d43dac3 100644
--- a/public/js/photonav.js
+++ b/public/js/photonav.js
@@ -4,14 +4,14 @@ function enableKeyDownNavigation() {
 			var target = document.getElementById("previous_photo").href;
 			if (target) {
 				event.preventDefault();
-				document.location.href = target + '#photo_frame';
+				document.location.href = target;
 			}
 		}
 		else if (event.keyCode == 39) {
 			var target = document.getElementById("next_photo").href;
 			if (target) {
 				event.preventDefault();
-				document.location.href = target + '#photo_frame';
+				document.location.href = target;
 			}
 		}
 	}, false);
diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php
index 49ac58b3..52b6fe59 100644
--- a/templates/PhotoPage.php
+++ b/templates/PhotoPage.php
@@ -84,14 +84,14 @@ class PhotoPage extends Template
 	{
 		if ($this->previous_photo_url)
 			echo '
-				';
+				';
 		else
 			echo '
 				';
 
 		if ($this->next_photo_url)
 			echo '
-				';
+				';
 		else
 			echo '
 				';