FIX: TaskQueue worked in a seperate thread.

Make taskqueue functional, see the code and comment.