WL-2904 Fix for writing out the wrong value.

We were writing out the username twice rather than the department the second time.
Merge pull request #107 from ox-it/WL-2904

WL-2904 Fix for writing out the wrong value.