Changing script with errors