state compare fix