Fix issues with sqlite :memory: