fix a JavaScript problem which was creating problem with jquery ui tab