Fix error when no charts exist and updatePageTitle is called