Fixing bug where DLM gets run multiple times.