Don't try to close the db, and pass the result properly (i.e. json obj)