avoid this mess? no, not really. I noticed this is a no-limit table, and I think you should've bet out more on the flop. like you said, villan one will call down with TPTK, and you want to make him pay, right? and you also say you think villan 2 might be on a draw, so you don't want to give him good odds to draw, right? (which you were doing on the flop) I think a $2 post-flop bet is the best play here.

on the turn, it's 4 to a straight, so the check isn't a terrible play. assuming I got called on the flop, I might throw out another bet around $2. even if someone has a straight, you still have 10 outs to make a full house.

It sucks that someone flopped a straight on you when you made top set, but hey, that's poker.