change sorting on tasks and adding errorlabel