bugfixing on preProcess and postProcess methods