Fixed error in case where img tag has no src attribute