made sure entry still saved on exit