fix thread save, based on inner class SaveThread