Sqlite syntax fix