Attempting to make the image system more robust... still needs help.