Suppose that k is an arbitrary field. Let k[[x 1 , . . . , x n ]] be the ring of formal power series in n variables with coefficients in k. Let k be the algebraic closure of k and σ ∈ k[[x 1 , . . . , x n ]]. We give a simple necessary and sufficient condition for σ to be algebraic over the quotient field of k[[x 1 , . . . , x n ]]. We also characterize valuation rings V dominating an excellent Noetherian local domain R of dimension 2, and such that the rank increases after passing to the completion of a birational extension of R. This is a generalization of the characterization given by M. Spivakovsky [Valuations in function fields of surfaces, Amer. J. Math. 112 (1990) 107-156] in the case when the residue field of R is algebraically closed.