Fix tests in case of multiple prefixes