Fix unreachable functions