Fix bug in duration string parsing