Fix a couple of issues so that image box creation now works.