Better prefix filtering, makes sure prefixes that start the same way
don't clash