Convert modified[UDA_KEY] to string before using rstrip