Fixes undefined local variable.