fix some tests and misc behavior