Fixed sql lite crash issue