Fixed 'Undefined variable'