Added state validation