script: fix delay call handling