Fixes single page mode bug

The CssInjector function's singlePageMode variable shadows the outer variable which causes the single page mode to work not properly.