fixed nonasync save function