Melanieme, your contract of sale should contain a separate document called a short sale addendum. If should have language in it similar to this: that although the house is being sold as-is, you have the right to obtain inspections, and in the event any repairs will be more than let's say $5,000 in the aggregate, you can cancel the contract. Your realtor should have recognized if this language wasn't included and should have advised you to consult with an attorney BEFORE signing the contracts.
The attorneys many of us work with here in South Jersey are below. Simply Google them and tell them Eric Axelson from Sotheby's sent you. I was at a previous company when I worked with them in the past, but John at least should recognize the name.
-John Rothamel, Rothamel Bratton, Kings Hwy, Haddonfield
-Bill Sragow, Law Office of William Sragow, Cherry Hill