diff --git a/source/anim/DynamicModelProvider.cpp b/source/anim/DynamicModelProvider.cpp
index cc06aaed5d550f1b81c80d82e8cdb5accb95aacd..bc5df76e702cb858e02aa3be5cd58e81d4e3bd90 100644
--- a/source/anim/DynamicModelProvider.cpp
+++ b/source/anim/DynamicModelProvider.cpp
@@ -300,7 +300,7 @@ void CDynamicModelProvider::onSharedModelReady(CDynamicModelShared *pShared)
 }
 void CDynamicModelProvider::onSharedModelRelease(CDynamicModelShared *pShared)
 {
-	m_mModels[pShared->getResource()] = NULL;
+	m_mModels.erase(pShared->getResource());
 }
 void CDynamicModelProvider::onSharedModelFeaturesChanged(CDynamicModelShared *pShared)
 {
diff --git a/source/core/ResourceManager.cpp b/source/core/ResourceManager.cpp
index 09e48e77e9a392c2e404254bd60b2cceafa04d13..0ff41aa560d0e8711c47e118decad5117156503d 100644
--- a/source/core/ResourceManager.cpp
+++ b/source/core/ResourceManager.cpp
@@ -92,8 +92,8 @@ CResourceManager::CResourceManager(IXCore *pCore):
 
 bool XMETHODCALLTYPE CResourceManager::getModel(const char *szName, IXResourceModel **ppOut, bool bForceReload)
 {
-	const AssotiativeArray<String, IXResourceModel*>::Node *pNode1;
-	if(!bForceReload && m_mpModels.KeyExists(szName, &pNode1) && (*pNode1->Val))
+	const Map<String, IXResourceModel*>::Node *pNode1;
+	if(!bForceReload && m_mpModels.KeyExists(szName, &pNode1))
 	{
 		(*pNode1->Val)->AddRef();
 		*ppOut = *pNode1->Val;
@@ -112,7 +112,7 @@ bool XMETHODCALLTYPE CResourceManager::getModel(const char *szName, IXResourceMo
 	strlwr(szLowcaseExt);
 
 	CResourceModel *pResource = NULL;
-	const AssotiativeArray<AAString, Array<IXModelLoader*>>::Node *pNode;
+	const Map<AAString, Array<IXModelLoader*>>::Node *pNode;
 	if(m_mapModelLoaders.KeyExists(AAString(szLowcaseExt), &pNode))
 	{
 		auto &aLoaders = *pNode->Val;
@@ -284,7 +284,7 @@ bool XMETHODCALLTYPE CResourceManager::getModelInfo(const char *szName, XModelIn
 	char *szLowcaseExt = strdupa(szExt);
 	strlwr(szLowcaseExt);
 
-	const AssotiativeArray<AAString, Array<IXModelLoader*>>::Node *pNode;
+	const Map<AAString, Array<IXModelLoader*>>::Node *pNode;
 	if(m_mapModelLoaders.KeyExists(AAString(szLowcaseExt), &pNode))
 	{
 		auto &aLoaders = *pNode->Val;
@@ -330,7 +330,7 @@ void CResourceManager::onResourceModelRelease(CResourceModel *pResource)
 {
 	if(pResource->getFileName())
 	{
-		m_mpModels[pResource->getFileName()] = NULL;
+		m_mpModels.erase(pResource->getFileName());
 	}
 }
 
@@ -382,16 +382,13 @@ const XFormatName* XMETHODCALLTYPE CResourceManager::getSoundSupportedFormat(UIN
 
 bool XMETHODCALLTYPE CResourceManager::getTexture(const char *szName, IXResourceTexture **ppOut, bool bForceReload)
 {
-	const AssotiativeArray<String, IXResourceTexture*>::Node *pNode1;
+	const Map<String, IXResourceTexture*>::Node *pNode1;
 	if(!bForceReload && m_mpTextures.KeyExists(szName, &pNode1))
 	{
 		IXResourceTexture *pOut = (*pNode1->Val);
-		if(pOut)
-		{
-			*ppOut = pOut;
-			pOut->AddRef();
-			return(true);
-		}
+		*ppOut = pOut;
+		pOut->AddRef();
+		return(true);
 	}
 
 	char *szFileName = strdupa(szName);
@@ -414,7 +411,7 @@ bool XMETHODCALLTYPE CResourceManager::getTexture(const char *szName, IXResource
 	char *szLowcaseExt = strdupa(szExt);
 	strlwr(szLowcaseExt);
 
-	const AssotiativeArray<AAString, Array<IXTextureLoader*>>::Node *pNode;
+	const Map<AAString, Array<IXTextureLoader*>>::Node *pNode;
 	if(m_mapTextureLoaders.KeyExists(AAString(szLowcaseExt), &pNode))
 	{
 		auto &aLoaders = *pNode->Val;
@@ -541,7 +538,7 @@ bool XMETHODCALLTYPE CResourceManager::getTextureInfo(const char *szName, XTextu
 	char *szLowcaseExt = strdupa(szExt);
 	strlwr(szLowcaseExt);
 
-	const AssotiativeArray<AAString, Array<IXTextureLoader*>>::Node *pNode;
+	const Map<AAString, Array<IXTextureLoader*>>::Node *pNode;
 	if(m_mapTextureLoaders.KeyExists(AAString(szLowcaseExt), &pNode))
 	{
 		auto &aLoaders = *pNode->Val;
diff --git a/source/core/ResourceManager.h b/source/core/ResourceManager.h
index b8c4c953c78317f1bebf85a991c95fc87c9e45ff..89642c36c7bf3fea66a13f2759b468deece776ec 100644
--- a/source/core/ResourceManager.h
+++ b/source/core/ResourceManager.h
@@ -50,7 +50,7 @@ public:
 		const char *szName = pTexture->getFileName();
 		if(szName)
 		{
-			m_mpTextures[szName] = NULL;
+			m_mpTextures.erase(szName);
 		}
 	}
 
@@ -60,14 +60,14 @@ public:
 protected:
 	IXCore *m_pCore;
 
-	AssotiativeArray<AAString, Array<IXModelLoader*>> m_mapModelLoaders;
-	AssotiativeArray<String, IXResourceModel*> m_mpModels;
+	Map<AAString, Array<IXModelLoader*>> m_mapModelLoaders;
+	Map<String, IXResourceModel*> m_mpModels;
 	
 	Array<XFormatName> m_aModelExts;
 
 
-	AssotiativeArray<AAString, Array<IXTextureLoader*>> m_mapTextureLoaders;
-	AssotiativeArray<String, IXResourceTexture*> m_mpTextures;
+	Map<AAString, Array<IXTextureLoader*>> m_mapTextureLoaders;
+	Map<String, IXResourceTexture*> m_mpTextures;
 
 	Array<XFormatName> m_aTextureExts;
 
diff --git a/source/mtrl/MaterialSystem.cpp b/source/mtrl/MaterialSystem.cpp
index a772e6dd3babe84773332e7617b4f5343ff34bd1..6c395b8aa2324b1ef7a2be91fad4d2aab524a9ff 100644
--- a/source/mtrl/MaterialSystem.cpp
+++ b/source/mtrl/MaterialSystem.cpp
@@ -109,7 +109,7 @@ void XMETHODCALLTYPE CMaterialSystem::loadMaterial(const char *szName, IXMateria
 	String sName(szName);
 
 	const AssotiativeArray<String, CMaterial*>::Node *pNode;
-	if(m_mapMaterials.KeyExists(sName, &pNode) && *(pNode->Val))
+	if(m_mapMaterials.KeyExists(sName, &pNode))
 	{
 		*ppMaterial = *(pNode->Val);
 		(*ppMaterial)->AddRef();
@@ -132,7 +132,7 @@ void XMETHODCALLTYPE CMaterialSystem::loadMaterial(const char *szName, IXMateria
 bool XMETHODCALLTYPE CMaterialSystem::getMaterial(const char *szName, IXMaterial **ppMaterial)
 {
 	const AssotiativeArray<String, CMaterial*>::Node *pNode;
-	if(m_mapMaterials.KeyExists(szName, &pNode) && *(pNode->Val))
+	if(m_mapMaterials.KeyExists(szName, &pNode))
 	{
 		*ppMaterial = *(pNode->Val);
 		(*ppMaterial)->AddRef();
@@ -176,10 +176,7 @@ void XMETHODCALLTYPE CMaterialSystem::reloadAll()
 {
 	for(AssotiativeArray<String, CMaterial*>::Iterator i = m_mapMaterials.begin(); i; ++i)
 	{
-		if(*(i.second))
-		{
-			loadMaterial(i.first->c_str(), *(i.second));
-		}
+		loadMaterial(i.first->c_str(), *(i.second));
 	}
 }
 
@@ -263,7 +260,7 @@ bool XMETHODCALLTYPE CMaterialSystem::loadTexture(const char *szName, IXTexture
 	String sName(szName);
 
 	const AssotiativeArray<String, CTexture*>::Node *pNode;
-	if(m_mpTextures.KeyExists(sName, &pNode) && *(pNode->Val))
+	if(m_mpTextures.KeyExists(sName, &pNode))
 	{
 		*ppTexture = *(pNode->Val);
 		(*ppTexture)->AddRef();
@@ -414,7 +411,7 @@ bool XMETHODCALLTYPE CMaterialSystem::loadTexture(const char *szName, IXTexture
 bool XMETHODCALLTYPE CMaterialSystem::getTexture(const char *szName, IXTexture **ppTexture)
 {
 	const AssotiativeArray<String, CTexture*>::Node *pNode;
-	if(m_mpTextures.KeyExists(szName, &pNode) && *(pNode->Val))
+	if(m_mpTextures.KeyExists(szName, &pNode))
 	{
 		*ppTexture = *(pNode->Val);
 		(*ppTexture)->AddRef();
@@ -660,7 +657,7 @@ void CMaterialSystem::onTextureRelease(CTexture *pTexture)
 {
 	assert(pTexture);
 
-	m_mpTextures[pTexture->getName()] = NULL;
+	m_mpTextures.erase(pTexture->getName());
 
 	m_poolTextures.Delete(pTexture);
 }
@@ -669,7 +666,7 @@ void CMaterialSystem::onMaterialRelease(CMaterial *pMaterial)
 {
 	assert(pMaterial);
 
-	m_mapMaterials[pMaterial->getName()] = NULL;
+	m_mapMaterials.erase(pMaterial->getName());
 }
 
 void CMaterialSystem::queueTextureUpload(CTexture *pTexture)
diff --git a/source/mtrl/MaterialSystem.h b/source/mtrl/MaterialSystem.h
index 445e8bed175f66fc4d266be2019fb793d9e9c3d4..a4c2c4d8b380d31c70a6aac1370801d00b28e761 100644
--- a/source/mtrl/MaterialSystem.h
+++ b/source/mtrl/MaterialSystem.h
@@ -353,7 +353,7 @@ protected:
 	MemAlloc<CTexture> m_poolTextures;
 	Array<IXTextureProxy*> m_aTextureProxies;
 	AssotiativeArray<String, IXTextureFilter*> m_mapTextureFilters;
-	AssotiativeArray<String, CTexture*> m_mpTextures;
+	Map<String, CTexture*> m_mpTextures;
 	CConcurrentQueue<CTexture*> m_queueTextureToLoad;
 	IXTexture *m_pDefaultTexture = NULL;
 
@@ -366,7 +366,7 @@ protected:
 	Array<IXMaterialProxy*> m_aMaterialProxies;
 	AssotiativeArray<AAString, Array<MaterialLoader>> m_mapMaterialLoaders;
 	Array<XFormatName> m_aMaterialExts;
-	AssotiativeArray<String, CMaterial*> m_mapMaterials;
+	Map<String, CMaterial*> m_mapMaterials;
 
 	IEventChannel<XEventMaterialChanged> *m_pNotifyChannel = NULL;