Isn't this string comparison going to check reference equality? Don't you want to check the contents of the record?