Added possibility of removing pending tasks from queue