app/js/photo.js bug fix