Update  for  locking in constructor