fix for sotck locking