Quick fix to automation script