Merge pull request #62 from alexanderson/master

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

Fixing single page aggregate sql issues