Merge "Fix issue with wrong mode when adding appeared task" into tm-dev