fixing main page toggle