Made L1/L2 error determination more efficient