BUG: correct handling of multiple classes
Merge pull request #2023 from g4b0/left-and-main-classes

BUG: correct handling of multiple classes