fix sqlite errors on second approval