fixes redirect loop for empty slugs