fixed classmethod problem with inheritance