fix save method; thanks coverals