fixes insertion issues