In all cases of appeal in the supreme court and the court of appeals, it shall be the duty of the court, whenever the transcript of a record shall contain any unnecessary matter had before the inferior court, to retax the bill of costs of the clerk of the inferior court, although no motion for that purpose is made by either party; and when the fees for such unnecessary matter contained in the transcript of the record shall have been paid to the clerk of the inferior court, the appellate court shall order the same to be refunded, which order may be enforced by attachment.
§ 514.280, RSMo