Fix error executing method as closure in other class