Fixed hanging if work duration is 0
Merge pull request #2 from sck-v/master

Fixed hanging if opening duration is 0