more fixes for resource merge