Fixed bug by reintroducing 'ip' assignment into worker loop.