reverting Maxs linalg changes