Fixed a bug with task editing