Fix error with undefined variable.