Fixed thread exceptions in Stratum code