fixing bug when pagehome load