fixed bug with late applog_lock init, by cbuchner1