fixed problem where calculations were run before image was loaded