fixed weird image assertion bug, whilst loading grayscale images