Minor change in database query code