Fix issue with too many resource callbacks being triggered.