fix failing tests and other small edits