fixing some discrepancies in the output