fix bug with reached db limit