fixed sqlite bug