set the main tabs and fixed an annoying back-button bug