Fixed the offset +1 issue and footer information issue