Fixed sql bug on boolean for sqlite3