Correct HEADER_SIZE and add isThisType check.