fixed algorithm links between tabs