issue #82: removing unnecessary MAX usage