Fixed resource name selection priority. Added fix for id and _id options at router.