Fixed problems introduced when directly creating from images.