1) Fixed the missing resource variable bug.