two minor fixes in database scripts