Fixes to mqtt provider