Did always get a crash on close. valgrind told this would be a possible reason for it.