An exception is now raised if maximum number of iterations is exceeded