fixing empty line generation