Fix Undefined method error