add late import and fix closure error