fixed problem with repeating replies on restart

- was caused by the last save done by the $shutdown callback,
  it's called on a different process, so we were saving old values