removed another mutex but this seems to be worse than the last commit