fixed maxIterations and rule firing