I'm using overleaf as my latex editor and I have a problem with the arrows in my reaction mechanism, the blue ones are how they should be, but they stay in the first molecule (red arrows)
\tikzset{obrace/.style={left delimiter={[},inner sep=3pt},
cbrace/.style={right delimiter={]},inner sep=3pt},
braces/.style={left delimiter={[},right delimiter={]},inner sep=3pt}}
\setchemfig{atom sep=2em}
\schemestart
\chemfig{H-C(=[:60]O)-[:-60]O-H}
\arrow(--M1[obrace]){-U>[\scriptsize\chemfig{H_2SO_4^{}}][\scriptsize\chemfig{HSO_4^\ominus}][][.25]}
[,1.5,shorten >=6pt]
\chemfig{H-@{a2}C(-[:60]O-H)(-[:30,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-H}
\arrow(--[cbrace]){<->}
\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-H}
\arrow(@M1--){<=>[*{0}\scriptsize\chemfig{H-[:120]@{a1}O-[:60]CH_3}][*{0}\tiny addition]}[-90,1.33]
\chemfig{H-C(-[2]O-[:30]H)(-\chemabove{O}{\scriptstyle\oplus}(-[:60]CH_3)-[:-60]H)-[6]O-[:-30]H}
\arrow{<=>[\tiny protolysis]}[180]
\chemfig{H-C(-[2]O-[:30]H)(-O-CH_3)-[@{B1}6]@{a3}O(-[:-150]H)-[:-30]H}
\arrow(--[obrace]){<=>[*{0}\scriptsize\chemfig{{-}H_2O}][*{0}\tiny elimination]}[-90,,shorten >=6pt]
\chemfig{H-C(-[:60]O-H)(-[,.5,,,draw=none]{\scriptstyle\oplus})-[:-60]O-CH_3}
\arrow(--[cbrace]){<->}
\chemfig{H-C(=[:60]\chemabove{O}{\scriptstyle\oplus}-H)-[:-60]O-CH_3}
\arrow{-U>[\scriptsize\chemfig{HSO_4^\ominus}][\scriptsize\chemfig{H_2SO_4^{}}][][.25]}[,1.5]
\chemfig{H-C(=[:60]O)-[:-60]O-CH_3}
\arrow(@M1--[yshift=-5pt]){0}[180,.5]{\tiny protolysis}
\schemestop
\chemmove[red,shorten <=3pt, shorten >=1pt]{
\draw(a1)..controls +(0:1.5cm)and+(0:3cm)..(a2);
\draw(B1)..controls +(0:5mm)and+(5:5mm)..(a3);}
Even with an easier example I have the same problem, the red arrow should go to the H above the arrow and not to the R1, and playing with the code I found that when I dont use the \arrow between molecules (only +) the mechanism arrows go where they are supposed to, does anybody now how I can solve this, if it is an Overleaf problem or do I need an specific package
\setchemfig{atom sep=7mm}
\schemestart
\chemfig{R1-@{dnl}\lewis{2:6:,O}-H}
\+
\chemfig{R2-@{atoc}C([6]-OH)=[@{db}]O}
\arrow(.mid east--){<->[\chemfig{ @{atoh}H}]}
\chemfig{R2-C([6]-OH)(-[2]O(-[1]H)-[3]R1)-OH}
\schemestop
\chemmove[shorten <=2pt]{
\draw(dnl)..controls +(90:1cm)and+(north:1cm)..(atoc);
\draw[red, shorten >=6pt](db)..controls +(north:5mm)and+(100:1cm)..(atoh);}