Fixed issue #81 header availbaleHeight miscalculated
fixed issue with printing of headers and footers