add check method name and fix bug