fix check_class. fixes #16.