setting header masking if not provided, fixes #24