Start with empty app:
1- add a site
2- add another site
3- select the second site
4- delete the second site
=> the first sit is not selected
A good fix would be to not display the the "back to dashboard" button till something is being selected.
Or just fix the issue about the first site not being selected.