Fix profiles detection