v4 fixed bugs:
- managed change tabs when script is empty
- avoid data loose after check a wrong script