I forgot to mention that in my test case, atomHeader.size is 24, so it should be atomHeader.size - 8.