more test coverage, fixes