Before call wp() function