SQL-Error fix complete