Fixed edgecase NPE when replacing placeholders in a message