tests, some fixes