Fixes testing bug in mqtt:listen