bugfix for the image output