fix for issue #10483
variable for found avatar div
restrict $div to local scope