Small improvements in CommandManager which allow resubscription in case Application.MainWindow has changed