Add a format attribute to the format functions and fix the broken format