bugfix class' extend method