Fix tests and CI