fixed error for printing