Removed some unnecessary locks.