set instead of insert fixes a segfault?!