Let $X$ be a normal proper variety with only rational singularities and $A$ an abelian variety. Does a rational map $X \supset U \to A$ extend to a morphism $X \to A$? If not, what is a counterexample? For $X$ smooth, I believe any map to a group scheme defined in codimension $1$ extends to all of $X$. Can anything be said for $X$ mildly singular? For rational maps to abelian varieties, I think extension should hold for rational surface singularities because then there exists a resolution whose exceptional fibers are trees of rational curves which are contracted in the map to the abelian variety. In general, I would like to make the following argument work: choose a resolution $\pi : \tilde{X} \to X$ with $R^i \pi_* \mathcal{O}_{\tilde{X}} = 0$ for $i > 0$. Then any exceptional fiber $E \subset \tilde{X}$ should have $H^i(E, \mathcal{O}_E) = 0$ and therefore admit no nonconstant map to an abelian variety. Can formal functions make the above proof work? We get that $H^i(\hat{E}, \mathcal{O}_{\hat{E}}) = 0$ where $\hat{E}$ is the formal fiber. From this, I should be able to conclude that $\mathrm{Pic}_{\hat{E}}^0 = 0$. Does this imply that maps $\tilde{X} \to A$ have to contract $E$?