Fixed problem that was causing infinite loop.