SQlite db final fix