fixed error while editing a todo