Fixed several virRM bugs related to the insertion and deletion of data on the DB