Fixed int max -> return 0 on empty vector