fix broken tests and warnings