A few fixes requested by @deguio (DQM MT migration).