bug fixes
more tests