Fixed Header Table script with Issue #59 fixed

The script is patched and compacted by me