fix max number bug