better image viewer behaviour - fix #53