remove trailing tilde