Fix undefined local variable or method `a'