[geo core] Fix some deallocation crashes