Prepositions ending a sentence should be avoided but not fanatically. When corrected for making this error, Winston Churchill responded that such were things up with which he would not put. Rewriting the sentence is the best way to avoid the problem (He would not put up with such things).