minor database query update