Fix bug in "save" method