Fixed bug where images rendered as white boxes