Fixed error with database initialization