added better validation for slugs.