Use sprintf properly