fix error when no format is specified