Added a better check on the prefix.