order save function fix