Bug fix for no database