Fixing single page aggregate sql issues
Small fix
Merge pull request #63 from dannybutler/master

Fixing single page aggregate sql issues