Hopefully fixed some threadding issues