sqlite str formatting bugs