credentials thread safe fix