Fix problems with sqlite