improved compatibilité and destroying of nested resources