make debug class actually thread-safe