fix problems when going back to home page