Fix save() bug

Fix bug that saves finished tasks. Now only unfinished tasks are saved.