Fix bug with saving Task model