Fixed 'undefined index' when a method does't called.