Added exception to handle undefined method