Fixed (and improved) save method