Fixed sequence issues with processImage()