Set avgColor assignment back inside loop.