fix bugs in image test