fixed sql errors not beeing thrown as exceptions