fixed error on image output