Script fixes