A few database checks added