Fix npos comparison check in baseName