fix npe from String.rest