fix errors
fix a couple more errors
first query of the db