fixed broken tests and warnings