Fix order of operation when calculating margin for forms in rows