Fixes for resource merge