Removed some not needed locking statements, these functions are only called from 1 thread.