Fixed bug with nextPhoto navigation.