bug fixes and removed terminated parameter from threadproc and threadmeth