Feature matching to 3.1, bugfixing