Make objects thread-safe