Fix the resource bug.