Revert "add task with no prev or next at the end of the list"

This reverts buggy commit 189334a481dda8d2d512c8b4c511344116fad1d1.