Fix max score calculation