Added headersize argument in constructor

Added headersize argument in constructor, since the field is used during construction