fix for using in browser