A S-corp transfer rental property to the shareholders

I and my husband are the shareholders of the s-corp.. The s-corp owns a rental property for 15 years. Now I want to transfer the property to our names and dissolve  the s-corp.  Should I transfer the property and close the corporation in the same month?  Is the transfer considered a distribution to shareholders at fair market value? How does the capital gain pass through to the shareholders? I really need help to plan for the tax consequence.

 

Yvonne