Fixed dynamic building of sqlite INSERT statements