Fixes undefined method of class