bugfix for resetImage method