Fix bug with multiple profiles