Dealt with the case where the preview window is used by another plugin