Fix message factory