Fixed Scheduler:terminate.

Do not resume when dead.
Error data must be passed as table.
Fixed table lookups (state should be self)