Fix dashboard switching bug