Fix compare check