Another improvement to class identification - Fixes #1