Fix crash on main page