Fixed some errors in SQL
Adding is causing segfault need fresh view to actually fix it