fixed a bug which prevented sqlite INSERTs