While it is unfortunate you damaged the supply, the far more important issue is that this occurred. For the inverter to be damaged upon restoration of power, you committed a very serious violation. You plugged the inverter into an outlet, to power your residence apartment, you were also powering the grid supplying your home. This could have damaged someone else's appliances and more importantly injured or killed someone working on the power lines. Before you repair this device, get a transfer switch and install it properly.