Don't be so grabby, and accommodate trailing whitespace