Fix spelling error in calling Math.max
Fix syntax error in calling max method