Modified BaseResource.cpp