Fix some tests and minor typos