Fix a potential thread safety issue, update readme