Ivy flavor. fix minor bugs. #2700