remove extra space that will clobber input