fixed bug preventing creation of proper auth headers