Added a thread save lock.