Maybe you should differently declare the workDur. figure out the number of frames you wish to have(i named it framesNumber) and try something likeworkDur = framesNumber*app.project.activeItem.frameDuration