The importance of S corporation basis and distribution elections