fixed bug where updateImage would crash if the image hadn't been loaded yet