Additional tests, fixes