On the trial of such issue, the plaintiff is required to establish and the defendant may deny, the time when such defendant entered into the possession of the premises, the time during which he or she enjoyed the mesne profits thereof, and the value of such profits; and the record of the recovery in the action of ejectment shall not be evidence of such time. On such trial, the defendant shall have the same right to set off any improvements made on the premises, to the amount of the plaintiff's claim, as is now or shall hereafter be judicially allowed; and in estimating the plaintiff's damages, the value of the use by the defendant of any improvements made by him or her shall not be allowed to the plaintiff.
735 ILCS 5/6-138