fixes #5170 JS Error when you click on Dashboard