Fixed a null pointer when adding an image to randomizer