I think this thread needs a lock :X