Fixed bug where clicking on same tab cleared page