fix State bug