made auto-reverting of images actually work