Problem with SQLite Foreign keys. Hopefully this will fix it.