Fix for non working database
Quick fix for null pointer exception