Making this threadsafe. D'oh!