fixed initiation of scoped_lock