If the number of states does not match the size of the remaining parameters, the error message is misleading. It reports, that the next header could not be read, which is technically true, but does nevertheless point the user in the wrong direction. Since the actual cause of the problem is the wrong number of states.