updated tests, minor fixes