Removing couts and correcting a bug.