The short answer is that you can't prevent someone from taking a shot and suing you. It is a legal tactic, and as so long as it is not frivolous, is always a consideration. You can take precautions, as you have done to enter into relationships using contracts/agreements, and conducting your business utilizing a corporate structure, as you did with the S-Corp. These precautions may enable you to successfully defend against liability in the suit, but the fact that someone is still taking a shot and including you personally as a defendant is just the way it is.
The theory behind corporate entities, such as an S-Corp is that you are limiting your liability to that of your capital investment so long as you have acted in a manner that separates your business and personal activities. This is the "corporate veil", and when you are sued personally the plaintiff is seeking to "pierce the corporate veil" and attribute personal liability to your actions. You will, unfortunately need to defend yourself in this situation and possibly move to dismiss the case against you pesonally if in fact you kept your personal interests and assets separate from the business, maintained separate bank accounts, signed the agreements in your corporate capacity and not as an individual, and did not act in such a way as to allow the plaintiff to have cause to "pierce the corporate veil" and attach liability to you personally.
From reading between the lines, my first observation is that the Texas court may not have personal jurisidiction over you. The Wikipedia link below gives a very good analysis of personal jurisidiction. If the court cannot gain personal jurisidiction over you, then it cannot render a verdict against you. If the company you contracted with was a Texas corporation and your contract designated Texas law, then that is probably enough to gain personal jurisdiction. This leads to my second observation that, absent any type of fraud or other tort on your part, or failure to adequately maintain your corporation records as distinct from your personal records, you are most likely improperly named as a defendant in this lawsuit. The plaintiff would be required to "pierce the corporate vail" in order to reach your personal assets (see the link below for more information about piercing the corporate veil). It is very important that you seek the advise of a litigator, someone who can help you sort through the facts and take the appropriate action. If you require legal counsel in Texas, depending on the area, I know a good lawyer down there. Just e-mail me and I will send you his contact info.