Remove unreachable states