Making database more robust