fixes a few browserify bugs