re-fixed bug with duplicate tasks in queue