Attempt to fix problem with trailing white space not being deleted