Added missing variable to function.