fix bugs, improve relex extraction