Fix underrun issues. Change scope of locks.
1 file changed