Some sprintf fixes