Quick fixes to sqlite managment