Quick bugfixes to imaging