fix reset function to reset image also