fixed some minor output stream errors