Fixed the error in format_code function.