Fix closure in static method