fixed typo in max()