fix the nonetype error when getting a label of a task; close #189