On the treatment of singularities in the multigrid method