Fixed 'Uncaught Error: 10 () iterations reached...' errors.