Fixed error when MAgic number is wrong