fix bug with endless recursion
when call hasattr(self, '_initialized') with not initialized database