fixed method hasPrefixOf