Changed PKTHREAD to PETHREAD for thread iterator