Hash lookup should be matched exactly against the slug

RegExp('active', 'i') is a substring test and matches both 'active' and 'inactive' as true. This is probably not what's intended by this condition.