Making all tests in sqlite pass