test runner and bug fixes