fixed printing problems