Added check of status for tasks that are being inserted into task queue during schedule.. (the must be != DEAD)