[GEM-dev] segfault on destroy or close