Fixes for mqtt tests