Fixed Issues

Fixed some SQLite problems some nullexceptions still occur