Flexgrid

Fixed a central bug that made elements insert after the wrong elements