Fixed NullPointerException occurring when trying to create new image content