gc_merge fixes
check for null on error path