Bug fix with mistake on new image function.