Fixed bugs with null images and image sources