qtmux: Adding some ifs for protection