Preparing the switching of docs.