tests and fixes
