fix state checks...