Fix save task when pressing back

Closes #23