Fix for empty task list crash