Tweaked to update sqlite db.