tested sort string copy fix