bug fix for img