Fix per-page export bug

This is fixed in master, but is present in the rails-3.0.x branch