fix bug of undefind method