Fixes URLStream endianess
Workaround to wait for image to be loaded.