  We will study a linear first order system, a connection $\db$ problem, on a
vector bundle equipped with a connection, over a Riemann surface. We show
optimal conditions on the connection forms which allow one to find a
holomorphic frame, or in other words to prove the optimal regularity of our
solution. The underlying geometric principle, Theorem \ref{theorem KM}, is
classical and well known \cite[Theorem 1]{KM}; it gives necessary and
sufficient conditions for a connection to induce a holomorphic structure on a
vector bundle over a complex manifold. Here we explore the limits of this
statement when the connection is not smooth and our findings lead to a very
short proof of the regularity of harmonic maps in two dimensions as well as
re-proving a recent estimate of Lamm and Lin \cite{lamm_lin} concerning
conformally invariant variational problems in two dimensions.
