remove trailing whitespace regex fix