Some small changes to the core.
Corrected bug that made all resource typed as 'NONE'