fix a bug about locking save_handler()