Minor fixes to support multi-instance launching

Contributed by QANTau