[#1076] thread safety vars

Those edits were easy. The remaining vars are the though ones.