Ensure var defined before function invocation using it as closure