Fixed bug that could sometimes cause image to appear blank.