Fixed undefined variable

Undefined usage of $name is in Line 111