Fixed Header Table script with Issue #59 fixed

The script is patched and compacted by me
Merge pull request #46 from solomax/patch-1

Fixes #59, thanks!