added an inactivelooplimit