fixed a bug in the winTable calculation