fix infinite loop with empty comma