Fix suspected thread-safety issues with wiring