Fixed crash due to threading lock missing