minor sql changes
Merge branch 'master' into Authentication