tests and fixes (not all)