fix state selector error