Fixed an update bug

Fixed an update bug and added on deactivation to drop plugin tables, do not deactivate if not necessary. To do on next version: an export file before drop tables, to prevent accidentally data loss.