Added minor fixes to AddResourceAPI.