fixed problem with sqlite db