fix max's compilation error