fixed matching logic
fixed debug comment