fix maxID undefined 2