fix the js controller that calls the tabs