fixed ustr helper function