fix comparison operator type bug