Fixed mistake in S_max calculations (absolute)