Hello there and thank you for the reports! Appointing a Vizier while married changes the Spouse Councill position to the Confidant Councill position allowing you to switch between your Spouses/Concubines and Vizier. Still it shouldn't change the appointed confidant without your knowledge so I've reported the issue to our database.