Fix Undefined variable