Fixed infinite looping problem..