Fix undefined name 'worncount'