fixed bad uri bug caused by newlines followed by urls