Adds synchronized block to Ding methods that are non-thread safe (fixes
#2442)