Company limited by guarantee - error in settup

Hi

I have a new client who runs a small trading company that started around a year ago (i.e. first set of accounts). We have just discovered that the company that he (the client) setup was mitakenly setup as a company limited by guarantee rather than shares.  The company has done many transactions in the year, including paying dividends to the (supposed) shareholders.

Can anybody please advise how we can rectify this issue now?  How do we account for the dividends paid to the supposed shareholders?

What are the tax implications of this error?

I have advised the client to open a new company and to trade from the new company from now on.  But I am really struggling to know what to do about the existing company and how to account for all the dividends paid.  Any help will be gratefully received.

Thanks

Daniel