fixed bugs in photo display