Some fixes of the scripts