fixing sqlite problem