trying to fix thread issues.