fixed error printing