Fixed issue of undefined method.