Fixed format() to properly replace placeholders