Fixed a division by 0 cause by ScriptAction-duration 0