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

Please look here: https://github.com/azer/boxcars/issues/11