Few fixes with the script