Bugfix in test_img