Corrects mistake in SQL