fix max stack size judge