fix broken tests and fix CS