Fixes broken ampersand. Move location of threading lock