fix for #22 impersonation
Merge pull request #23 from layby42/master

Pull request for #22