Two crash/infinite loop bugs.