Try to fix infinite loop