Fix tests and dependencies