Multiple fixes to get image loading working