Bugfixes and minor changes to image dialog