Fixed a bug in State.prototype.isComplete; commented code