Fixed sqlite issue