fix the case when B is supplied with 5th column (magnitude)