Fix install and uninstall
Fix sql query for install