fixing invalid save method