Fix error in prefix check