Fix local variable 'result' referenced before assignment