repaired closing db when closing application because autoincrement cache lost 32 numbers