Add back in a single lock to remove potential goroutine leak