Fix bug that returned None when max returned []