Tries to fixes infinite loop