Removed some not needed locking statements

These functions are called from a single thread, no need to lock there.