Make injection and singleton scope thread safe