Fix delta matching logic