Fix variable is undefined on DrawLine function