Photo viewer bug fixes