fixed sqlite issues