print nicely and fix error