fixing some output issues