Fixed bug in max(). Passes unit tests.