fixed custom separator logic