Hanging resolved using CriticalSection. Refactoring of changeset (3392796fff27)