make sure magic bytes are read fully