Use max of all dimensions instead of max of first 2