Minor change to SQL code