Make sure everything is thread-safe