Merge pull request #31 from kajdus/devel

credential thread safe fix