fix undefined local variable or method `params'