Introduce thread-safety