Fixed bug which was adding separator when it shouldn't