Fixed max() macro bug