fixed requeuing of tasks