fix bug in rules update, fix win-state