Fix typo and add support for custom headers