sql fix and stuffs
Merge remote-tracking branch 'origin/master'
haxx for merge