Minor fix to format() method