some tests, fixes