Fixed infinite loop and timeout. Updated description