Fix rogue variable in function call