fix a works count bug