Fix problem calling methods from a var closure