fix crash just introduced in unfrequent cases.