Topological couplings and contact terms in 2d field theory