has_category not working correctly

you do not reset the icon variable after each iteration of the loop, therefor once it gets to be a “star” it will always remain.