Merge "Remove locks from StateManager to avoid race condition"