I cannot figure out the bug in this one for the infinite loop. Is my logic to pass this task correct? Please help :)