Removed segfaults in insert