fixed some output issues