Fixed broken database query. Minor grammar/syntax revisions.