Script error fix