Fix browse script not working due to scope