fix classmethod detection