Make it thread-safe. It can't be used in concurrent function calls.
Merge pull request #2 from fatih/patch-1

Make it thread-safe. It can't be used in concurrent function calls.