Correct extra space in generated output