BUGFIX: Don't expose result variable as global