Fixes print_format function