Fixed bug with checking prefixes are the same