fix some problems with classmethod