fix some bugs and add resource processors