fixed mtchcecker and cleaned unreachable code