Fixed issue to work with AD accounts