fix. handle img source ref correctly