SQL: Fix sql import problems