Fix error when creating SQLiteDatabase.

Closes #967.