Pay attention to variable scope

Without the leading $:: the variables in params aren't resolved