Sqlite functionality, buggy.