UPDATED HEAD ERROR IN SCRIPTS