Fix double check locking