fixed deadlock on set