Fixed infinite loop 2