Made initialized resources dispose when the hash changes.