Reselect last task after edit + some fixes