Added preprocess event