fix problem with eternal cycle