--fixed for CRM-12024

used ts() in missing places.