fix bug about concurrent operations on set