fixed thread state exception