fixing errors with computing size with new HEADER_SIZE field