Fix: result is undefined