Corrected other SQL errors