Fixed JavaScript Tab selection on change event