repair preprocessing workflow. It works for individual images