fixed NPE in CollectingModeFactory