Removed unnecessary MAX calculation.