fixed bug loading script tab for first time.