Added an if statement to exclude currently toggld on tasks, which are indicated by a negative duration