Error fixed in unloadResource

changed for isLoaded = false to setIsLoaded(false);