Fix: re-introduce testing for magic byte