Fixed matching issue where name was being used in cmp instead of value