fix case where format is not defined