fix #34
fix #36 and fix #38
fix #37
Merge branch 'master' into enable-database