Fix bug to get browser code working again
Add automated browser test