fix max scale bug