remove trailing char