Fixed spelling error and variable name collision.
Readded current_tasks initialization.
Merge branch 'feature-threadsafe-tasks' into merge-threadsafe-tasks