fix regexp closure error