fixed issue where headers were being returned as a ruby hash string instead of json