fixed image viewer bug