Fixing delimiter bug when second paramanter is null