Fixed outputting 'undefined' in case of an undefined separator