Fix tests and lint