Removed unused max variable

Wasn't used within its scope
Merge pull request #1623 from johndoeno001/patch-2

Removed unused max variable