removed opportunities for double-checked locking bugs

Checked all occurrences of synchronized()
Found 3 locations using the double-checked pattern which were vulnerable for the double-checked locking bug.