Make the program thread safe.
