Fixed infinite loop..