Fixes server variable conversion to headers

Fixes issues identified in #150