fix the grammar for refs

[path, 'ref', key] -> [path, 'ref', ref]