Fixed a bug in add_task_item()