some fixes to the script and an auto script added