fixed a race condition in log framework leading to random crashes