fixing bug for other pages