fixed error with garbage in errbuff