Bad replace syntax
Remove whitespace from end of string
New version