fixed more errors related to new db design
Merge remote-tracking branch 'origin/master'