fix #6, #8
Merge pull request #17 from PuZheng/flask-report-6

fix #6, #8