bug fix for tasks