Fix resource name collision
Use R class of APG package