added preprocessing to fix class path out of order and also when events happen before the recourse is created