fixed insert creation, removed obsolete check