usually you need to live in the house as a primary residence for a year in many places to avoid capitol gains.
and check the papers carefully to see that there are not any outstanding leans on the property ,as well as any open building permits, or uninspected building permits.