Modified SQL to work with SQLite, which fixes #38.