fixed segfaults with array size & updated sql database
fixed segfaults with array size & updated sql database