Some bugfixes related to the master modal