fix bug in photo display the link does not work every time