addlayer modal windows fixes

Still some instability in appveyor tests but better than before.