fixing exception when loading remote images